package cn.com.roy.thread.t7_2_1.groupaddthread;

public class Run {
    public static void main(String[] args) {
        ThreadA aRun = new ThreadA();
        ThreadB bRun = new ThreadB();
        ThreadGroup group = new ThreadGroup("我的线程组");

        Thread a = new Thread(group,aRun);
        Thread b = new Thread(group,bRun);

        a.start();
        b.start();

        System.out.println("活动的线程组：" + group.activeCount());
        System.out.println("线程组的名称：" + group.getName());

    }
}
